<template>
	<view class="container">
		<image :src="url+'/static/imgs/result_title.png'" class="result_title"></image>
		<view class="resultcontent">
			<image :src="url+'/static/imgs/result_icon.png'" class="result_icon"></image>
			<view class="row result_header">
				<view class="result_header_img">
					<image :src="goodsInfo.goods_naming.member_avatar"></image>
				</view>
				<text>【{{goodsInfo.goods_naming.name}}】{{goodsInfo.name}}</text>
			</view>
			<view class="row result_content">
				<image :src="goodsInfo.image" mode="aspectFill"></image>
				<view class="result_content_name">
					<view class="overflow-row">{{goodsInfo.goods_naming.title}}</view>
					<text>￥{{goodsInfo.goods_naming.price}}</text>
				</view>
			</view>
		</view>
		<view class="result_button" @click="back">继续冠名</view>
	</view>
</template>

<script>
	var app = getApp();
	import http from "../../../../common/js/request.js";
	export default {
		data() {
			return {
				url: app.globalData.baseImgUrl,
				store_id: app.globalData.storeId,
				goods_id: 0,
				goodsInfo: {},
			}
		},
		onLoad(options) {
			this.goods_id = options.goods_id;
			this.getGoodsInfo();
		},
		methods: {
			getGoodsInfo() {
				var that = this;
				http.post('/api/v1/goods/goods_detail', {
					goods_id: that.goods_id,
					store_id: that.store_id
				}, res => {
					that.goodsInfo = res.datas;
				});
			},
			back() {
				uni.navigateTo({
					url: '/pages/store/naming/list/list',
				});
			}
		}
	}
</script>

<style>
	.result_title {
		width: 484rpx;
		height: 50rpx;
		margin: 122rpx auto 0;
	}

	.resultcontent {
		width: 718rpx;
		height: 334rpx;
		background-image: linear-gradient(to right, #ffbf00, #ffa310);
		border-radius: 20rpx;
		margin: 84rpx auto 0;
		position: relative;
	}

	.result_icon {
		width: 169rpx;
		height: 145rpx;
		position: absolute;
		bottom: 10rpx;
		right: 10rpx;
	}

	.result_header {
		height: 80rpx;
		line-height: 80rpx;
		margin-left: 30rpx;
		margin-top: 10rpx;
	}

	.result_content {
		margin-left: 30rpx;
		margin-top: 32rpx;
	}

	.result_content image {
		width: 211rpx;
		height: 198rpx;

	}

	.result_header text {
		font-size: 36rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: rgba(255, 255, 255, 1);
		text-shadow: 0px 6rpx 8rpx rgba(227, 144, 3, 0.4);
	}

	.result_header_img {
		width: 80rpx;
		height: 80rpx;
		border-radius: 50%;
		overflow: hidden;
	}

	.result_header_img image {
		width: 100%;
		height: 100%;
	}

	.result_content_name {
		width: 300rpx;
		color: #FFFFFF;
		font-size: 28rpx;
		line-height: 45rpx;
		margin-left: 27rpx;

	}

	.result_content_name text {
		font-size: 36rpx;
		font-weight: bold;
		margin-top: 20rpx;
		display: block;
	}

	.result_button {
		width: 749rpx;
		height: 99rpx;
		background: rgba(255, 157, 17, 1);
		position: absolute;
		bottom: 0;
		left: 0;
		font-size: 36rpx;
		color: #FFFFFF;
		text-align: center;
		line-height: 99rpx;
	}
</style>
